package cn.minsh.lims.eoms.modules.app.enums;

import lombok.Getter;

/**
 * @author Administrator
 */
@Getter
public enum RepairLeveEnum {
    COMMON(1,"一般"),
    SERIOUS(2,"严重"),
    VERY_SERIOUS(3,"非常严重");

    private Integer code ;
    private String desc ;

    RepairLeveEnum(Integer code, String desc){
        this.code = code ;
        this.desc = desc ;
    }

    public RepairLeveEnum valueOf(Integer code){
        for (RepairLeveEnum planStatusEnum :values()){
            if (planStatusEnum.getCode().equals(code)){
                return planStatusEnum ;
            }
        }
        return null ;
    }

    public static String getDesc(Integer code){
        for (RepairLeveEnum planStatusEnum :values()){
            if (planStatusEnum.getCode().equals(code)){
                return planStatusEnum.getDesc() ;
            }
        }
        return null ;
    }
}
